/**
* Copyright (c) 2022 Beijing Jiaotong University
* PhotLab is licensed under [Open Source License].
* You can use this software according to the terms and conditions of the [Open Source License].
* You may obtain a copy of [Open Source License] at: [https://open.source.license/]
* 
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
* MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
* 
* See the [Open Source License] for more details.
* 
* Author: Zhenjie Wei
* Created: Mar. 22, 2023
* Supported by: National Key Research and Development Program of China
*/

@mixin form-drawer-content {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: column;
    box-sizing: border-box;
    .form-tab {
        flex: 1;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-direction: column;
        box-sizing: border-box;
        overflow-y: auto;
        .tabs-content {
            flex: 1;
            flex-shrink: 0;
            width: 100%;
            box-sizing: border-box;
            overflow-y: auto;
            position: relative;
            .tabs-sticky {
                position: sticky;
                top: 0;
                padding: 10px 10px 0;
                z-index: 3;
                background-color: #fff;
                .pui-tabs {
                    border-radius: 4px;
                    .pui-tabs_content {
                        width: 100%;
                        .pui-tab {
                            padding: 0;
                            margin: 0;
                            &.active-tab {
                                box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.4);
                            }
                            &:hover {
                                box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.4);
                            }
                        }
                    }
                }
            }
            .tabs-tree {
                padding: 10px;
                position: relative;
                .pui-tree {
                    .pui-tree_box {
                        border: none;
                        .pui-tree-children {
                            .pui-tree-children_content {
                                .pui-tree-children_content-list {
                                    .pui-tree-children_content-item {
                                        overflow: hidden;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
        &.horizontal-tab, &.vertical-tab {
            .tabs-content {
                .list-content {
                    .content {
                        display: flex;
                        justify-content: flex-start;
                        align-items: flex-start;
                        .tab-column {
                            width: 30px;
                            display: flex;
                            align-items: flex-start;
                            justify-content: flex-start;
                            flex-direction: column;
                            border-left: 1px solid $border_light;
                            .tab-column_item {
                                display: flex;
                                justify-content: center;
                                align-items: center;
                                width: 100%;
                                padding: 40px 0;
                                border-bottom: 1px solid $border_light;
                                color: $text-font_light;
                                cursor: pointer;
                                span {
                                    font-size: 12px;
                                    white-space: nowrap;
                                    transform: rotate(90deg);
                                }
                                &:hover {
                                    background-color: $primary-fill;
                                    color: #fff;
                                }
                                &.active {
                                    background-color: $primary-fill;
                                    color: #fff;
                                }
                            }
                        }
                        .form {
                            box-sizing: border-box;
                            width: 100%;
                            height: 100px;
                            padding: 24px 10px;
                            .form-item {
                                display: flex;
                                justify-content: space-between;
                                align-items: center;
                                margin-bottom: 10px;
                                &.tab-form {
                                    .pui-selector {
                                        .pui-selector_text {
                                            min-width: 100px;
                                        }
                                    }
                                }
                                .label {
                                    font-size: 12px;
                                    margin-right: 10px;
                                }
                                .pui-selector {
                                    .pui-popper {
                                        .inline-block {
                                            width: 100%;
                                            >div {
                                                width: 100%;
                                            }
                                        }
                                    }
                                    .pui-selector_text {
                                        min-width: 115px;
                                    }
                                    +.pui-selector {
                                        margin-left: 10px;
                                    }
                                    .pui-selector-content {
                                        .pui-selector-content_list {
                                            .no-data {
                                                white-space: nowrap;
                                            }
                                        }
                                    }
                                }
                                .pui-input {
                                    font-size: 12px;
                                    width: 100px;
                                    outline: none;
                                }
                                .form-content {

                                }
                            }
                        }
                    }
                }
            }
        }
    }
    .pui-tabs {
        width: 100%;
        border-radius: 0px;
        border-right: 0;
        border-bottom: 0;
        flex-shrink: 0;
        height: 32px;
        box-sizing: border-box;
        .pui-tabs_content {
            width: 100%;
            .pui-tab {
                padding: 0;
                margin: 0;
                &.active-tab {
                    &:nth-child(2) {
                        border-left: none !important;
                    }
                }
            }
        }
    }
}

@mixin form-drawer-content-dark {
    .form-tab {
        .tabs-content {
            border-bottom: 10px solid $border_dark!important;
            background-color: $bg-home_dark!important;
            .tabs-sticky {
                background-color: $bg-home_dark!important;
                .pui-tabs {
                    .pui-tabs_content {
                        .pui-tab {
                            &.active-tab {
                                box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.4);
                            }
                            &:hover {
                                box-shadow: 0px 0px 2px 0px rgba(0, 0, 0, 0.4);
                            }
                        }
                    }
                }
            }
            .tabs-tree {
                .pui-tree {
                    .pui-tree_box {
                        border-color: $border_dark;
                        .pui-tree-children {
                            .pui-tree-children_content {
                                .pui-tree-children_content-list {
                                    .pui-tree-children_content-item {
                                        overflow: hidden;
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    .pui-tabs {
        .pui-tabs_content {
            .pui-tab {
                &.active-tab {
                    background: $bg-home_dark !important;
                }
                &:hover {
                    background: $bg-home_dark !important;
                }
            }
        }
    }
}
